package com.data.dao;

import com.base.dao.TemplateDao;
import com.data.entity.StateShift;

public interface StateShiftDao  extends TemplateDao<StateShift, Integer>{
	/**
	 * 根据设备id，班次id，所属日期查询设备状态班次记录
	 * @param equId
	 * @param shiftId
	 * @param stateType
	 * @param belongDate
	 * @return
	 */
	StateShift getStateShiftByIdAndDate(int equId,int shiftId,String stateType,String belongDate);
	
	//获取时间区间内，相同设备、班次、类型的状态累加值
	Double getDurationByShiftAndType(int equId,String stateType,String shiftName,String startDate,String endDate);

	//根据时间和类型共和班次，找到对应设备的记录
	StateShift getStateShiftBytypeAndDate(int equId,String shiftName,String stateType,String belongDate);
}
